Drag and drop creation and editing of a page incorporating scripts

ABSTRACT

An environment for developing clientside/serverside code is disclosed. The environment supports programming in an event-driven paradigm while the execution of the resultant programs are executed in a serial execution paradigm. Through shielding the developer from complex scripting segments, the environment provides the developer with the suggestion that that resultant execution model is event-driven. By treating scripts as later-definable objects, the designing phase of a page may be lessened, as the appropriate codings needed to implement a page are determined at a later date. In one example, the codings may be preliminary set as server side or client side, with the environment later adding the appropriate scripting language to complete the developed page.

I. RELATED APPLICATION INFORMATION

[0001] The present application is related to U.S. Ser. No. 08/959,300,entitled “Method and Apparatus for Automatic Generation of Text andComputer-Executable Code”, filed on Oct. 28, 1997. Also, the presentapplication is related to U.S. Serial No. ______, “A System forConverting Event-Driven Code into Serially Executed Code”, filed on______; to U.S. Serial No. ______ entitled “Transporting Objects BetweenA Client and A Server”, filed on ; and, to U.S. Serial No. ______,entitled “Page Object Model”, filed on ______.

II. BACKGROUND OF THE INVENTION

[0002] A. Technical Field

[0003] In general, the present invention relates to authoring of textand computer-executable code, and more particularly to techniques forautomatically generating HTML (hypertext markup language) script.

[0004] In recent years, the Internet has experienced tremendous growth.Its rapid development has resulted in a growing number of new uses ofthe Internet and its multimedia component, the World Wide Web (the Web).In particular, demand for richer, faster and more interactive web siteshave been driven increasingly sophisticated users. To attract moredemanding users, commercial and corporate Internet site authors attemptto stay ahead of their competition by providing more sites for users andpotential customers.

[0005] Enabling the growth of the Internet, corporate users haveexpanded the application of HTML into intranets. In this area, creatorsof authoring tools have strived to enable authors to create content-richweb sites with minimal effort.

[0006] When the world-wide web was first invented, the language used topublish data was a simple text-oriented formatting device. A serverwould send HTML documents to a client computer running a browser thatwould display the HTML content on the screen according to the formattinginformation embedded in it. The browser would transmit a request for aparticular HTML file and this HTML the server in response to the requestwould transmit file to the client. These HTML documents containedreferences to graphic files, which were also sent from the server to theclient and displayed according to the embedded instructions in the HTMLcode.

[0007] As the web grew in popularity, second-generation web-sites addedmore sophisticated formatting such as tables and frames and displayedgraphics as background along with other formatting devices. Still,content was still contained in files that were simply transmitted tobrowsers in response to requests for particular documents. In addition,server-side programs would custom-generate HTML documents in response torequests for specific information. For example the server would access adatabase in response to a search query and produce an ephemeral HTMLdocument that it would then send to the browser. However, suchinteractive sites were not common because of the sophisticatedserver-side scripting that was required. Even after third generationssites, which provided Java script applets, Adobe PDF files, animatedgraphic files, offered rather sophisticated look to sites, most sitesrelied on simply pushing fixed documents and applets to browsers inresponse to specific requests.

[0008] Recently with the introduction of Microsoft® Corporation's (ofRedmond, Wash.) Visual InterDev® 1.0 product, the process of creatingsites that custom-generate files for consumption and display by browsershas been dramatically simplified by employing various interestingtechniques. These include:

[0009] 1. Server-side scripting (Active Server Pages—ASP—developed byMicrosoft®) that allows dynamic web applications similar to Java, DHTML,and Active-X, which run on the client. An event occurring on the clientis transmitted to the server application and new page-layout data issent to the client to show the result.

[0010] 2. ASP objects that are wizard-like components that worksimilarly to Active-X controls implemented on clients. They haveproperties, methods, and events and must be instantiated (except forsome pre-instantiated components that are always available).

[0011] 3. Web Bots included in Front Page 97® are server-side componentsthat add functionality like that provided by CGI scripting.

[0012] 4. Visual InterDev® 1.0's raison d'etre, perhaps, is theconvenient integration of databases with web sites without sophisticatedprogramming. This integration is simplified through the use of acompatibility standard and a suite of pre-defined tools that may beincorporated in ASP script.

[0013] ASPs may be called using a URL (uniform resource locator) whichmay refer to the ASP file “page.asp” as follows:“<http://www.anycompany.com/page.asp>.” While the following descriptionuses the term “active server page” or “ASP,” any document or page whichcontains a script which, when executed, pulls data from a database andforwards it to an end application (another document or page) fallswithin the scope of the term, ASP, as used herein.

[0014] Requests to ASPs commonly take the form of user requests from aclient's browser. An example of a request is a request for current sportscores from a web site. In the process of requesting, the browser,located on the client, accesses the ASP with a request that providesadditional information to the server. For example, an active serverpage, named “scores”, may be connected to a database storing all currentsport scores. To access any particular set of scores, a browser userspecifies to the server which scores are of interest (here, baseballscores). Next, the browser attempts to access the <scores.asp>file witha “baseball” parameter attached to the file request (e.g.,<scores.asp?sport=baseball>. In this example, “scores.asp” is the activeserver page on the server, “sport” is a filter control handling theparameter “baseball”. In response to this request, the server forwardsthe desired baseball scores in HTML format back to the browser. Uponreceiving this new information, the current page is flushed and the newHTML data (containing the baseball scores in a predefined format) isdisplayed in the end user's browser. The returned information can alsobe images, documents, links to images or documents, or other data.

[0015] There are a few downsides to the use ASPs in complex sites.First, referring to an ASP with the current scripting parameters islaborious especially with long parameter strings. Developers who arefamiliar with higher order languages (including C++ and VISUAL BASIC5.0®) must revert to complex naming schemes for creating the client andserver side scripts. This reversion creates the opportunity for errorsand the need for additional debugging time.

[0016] Also, as currently used, each ASP is directed to a single script.For a large web site, with each and every ASP, no matter how closelythey are related, the ASPs require a separate files. Thus, the number ofrequired files for a complex site grows significantly. To this end,maintenance of the site becomes extremely complex and inefficient aseach modification to the site may require significant redrafting codefor the multiple ASPs. The near duplication of the ASPs can requiresignificant expenditures in time and planning of the web site, when anumber of ASPs are so closely related. Currently, there is no efficientway of consolidating ASPs into related groups.

[0017] In addition to the above functional elements, Visual InterDev®1.0 includes a host of features that relate to the developmentenvironment. Basically these features include such well-knownuser-interface features such as drag-and-drop, WYSIWYG, etc. Developersare allowed to instantiate programming objects using a visual metaphor.These ideas are well developed in the Microsoft Visual Basic ® productwhich takes these ideas substantially further than was possible inVisual InterDev ® 1.0 for a number of reasons which are explained below.

[0018] The development of web applications is complicated by a number offeatures stemming from the web context. In a classical client-servercontext, the capabilities of the client computer and those of the servercomputer are defined in advance of development of applications. In theweb environment, the capabilities of the client are not clearly defined.Some clients run browsers such as 2.x browsers lack capabilities, suchas the ability to run Java applets that are present in 3.x and 4.xbrowsers. A web application that seeks to provide sophisticatedfunctionality is confronted with the problem of where to run the codethat generates the sophisticated functionality sought: on the client oron the server. Some simple tasks can be performed on “dumb” clients suchas forms. A programmer is basically stuck with the problem of writingprograms that can handle both situations: putting the sophistication onthe server, sending plain HTML to the dumb clients as well as puttingthe sophistication on the client sending program components to a smartclient and letting the client run them.

[0019] Another feature of web applications is that the client-serverinteraction is both ephemeral and contentious in that the number ofdifferent clients potentially compete for the limited resources. Forthis reason, web pages that are generated by server scripts aregenerally dumped after they are sent to the client. The request datatransmitted by the client can be saved for a limited “lifetime” to allowa user to recall the web page. (“Lifetime” may embrace any criterionused for determining whether to persist a page, for example, for aperiod of time after the user's last visit or as long as the usercontinues to view and revisit the page without visiting another site,etc.) This involves regeneration of the page. This situation is not toobad in and of itself. However, scripting the calling and called pages tohandle the control flow required inevitably involves a lot of tediousold-fashioned sequential coding. That is, at a minimum, to add a page'scontent, or to employ any script incorporated in the page, to a callingpage, the calling page must be scripted to handle the called page, andthe called page, a return to the calling page. Conditional branchingwould also be involved which can be tedious and complex.

[0020] There is currently no way to incorporate the functionality of adestination ASP into a current page. Placing the following tag on aclient's page “<A HREF=“http://www.anycompany.com/alpha/page.asp”>”allows the user to select the tag and navigate to the ASP named“page.asp” in the “alpha” directory of the www.anycompany.com site.However, once the page.asp is selected with specific parameters, thecurrent page is lost with all its information. The only way to return tothe current page and modify the information transmitted to the ASP is bybacktracking and re-entering the previously entered parameters. Whileobject-oriented programming exists with respect to other programmingareas, there is little or no support for objects in program files ofHTML pages including ASPs.

[0021] Returning to the general problem of “managing state,” considerthe “lifetime” of a simple ASP page that contains a form for data-entryinto a database:

[0022] User navigates to the page—an HTTP GET causes the server to runthe ASP to produce a page for the client.

[0023] The browser displays the page and the user enters data andsubmits the form, causing an HTTP POST to the server.

[0024] The server runs the ASP page again to process the post. The codeparses the post parameters, updates the database and produces a newversion of the page for the client that informs the user the data hasbeen successfully entered.

[0025] It is clear that if the web developer wants to maintain somestate information over the lifetime of the page, then simply declaring avariable in client or server code is not sufficient. And obviously thedeveloper must do much more if it is necessary to share this stateinformation between code on the client and server.

[0026] There are three categories of state information:

[0027] Page—maintained for the lifetime of a page

[0028] Session—maintained for the duration of a user's session

[0029] Application—maintained for the duration of the application forall users

[0030] ASP supports caching data and objects in the server in theSession and Application objects, providing a means for maintainingsession and application state information. A common technique formanaging page state is to place values in hidden form elements. The formelements travel with the page to the client, can be modified, and theytravel with the HTTP POST data back to the server. A developer usingthis technique must write server code to create the form elements on thepage, write client code to access the form elements through the DocumentObject Model, write more server code to parse the values from the postparameters, and must be sure to write the values back out in the formelements for the new page that is sent to the client in response to thepost. This is another common task that complicates web programming andresults in duplication of effort. In addition to the coding overhead,the sheer complexity of sites with a high degree of sophisticatedfunctionality can be oppressive. Being stuck with old-fashionedsequential programs makes the management of the development andimprovement of web sites exceedingly complex, even unwieldy.

[0031] Finally, the way a client or server accesses an ASP is throughscript on the client/server page. Managing these scripts can beconfusing as the scripts on the server and the client may look similar,yet require slightly different structures and parameter fields. Addingto the level of complexity, in some instances, the server script maygenerate the client script. To keep track of the complexity of scripts,some page editors color code client script differently from serverscript. However, as pages become increasingly complex, color-coding isnot sufficient to support complex site management as the site becomesincreasingly harder to conceptualize.

III. SUMMARY OF THE INVENTION

[0032] A method and apparatus for the development of web sites treatsweb page script files and components according to an event-driven modeland more generally as objects with exposed methods and properties in amanner that, at development time, provides a common appearance whetherthe associated script or components are ultimately run on the client orthe server. According to a feature, script files and even simple HTMLpages are referenced as objects to provide a simple programming namingstructure (also referred to as a simplified namespace) and obviatesequential coding structure otherwise required to cross reference codeand page content among various callable elements of a web site.

[0033] Using the invention, ASPs are able to appear to other files asobjects with associated methods and properties. The methods are writtenin a widely supported language (for example, Javascript, Livescript, orJScript). The properties are stored on the server side so as to allowmultiple clients to access stored properties. Proxies of the propertiesare transmitted from the ASP to the client as needed.

[0034] Also, according to the invention, ASPs may contain variousobjects within each single page. Instead of creating each separate ASPto support a particular set of functions, the functions may be convertedinto objects and stored in a general ASP. Based on these adaptations,ASPs are readily adopted by high level programmers trained inobject-oriented programming rather than to manually written executablescripts for HTML pages.

[0035] One technique of referring to ASPs as objects, and the nestingthe objects within the ASPs, is through design-time controls developedby Microsoft®. Additional disclosure of design-time controls isdescribed in U.S. Ser. No. 08/959,300, entitled “Method and Apparatusfor Automatic Generation of Text and Computer-Executable Code”, filed onOct. 28, 1997, the contents of which are incorporated for any and allessential subject matter. A design-time control may be a form of ageneric control (for example, an ACTIVEX® control, of the MicrosoftCorporation of Redmond, Wash.). In general, a design-time control allowsa developer to place a script in a document that alters or enhances theoperation of the document.

[0036] Design-time controls incorporate wizard-like interfaces that canbe edited to modify the text they generate for a web page. DTCs takeadvantage of OLE design-time capabilities (including directmanipulations, property sheets, and persistence) to capture user inputs,thereby extending the capabilities of editors that support design-timecontrols.

[0037] A design-time control differs from a general control in that itoperates only in an editor (or container) when a web site is beingdesigned or maintained. Once the web site is saved, the design-timecontrol may create (among other things) script for theclient/server/ASPs. As applied to the present invention, the developeruses the design-time control to attach object identification informationincluding method and property information to each ASP. When saved, theattached object identification information and methods and propertiesare converted from the high level, object-oriented programming languageinto the appropriate HTML recognizable representations so that anyclient/server system supporting HTML may use the rendered client/serverfiles. Currently, end users are limited to a small number of browsers.By using design-time controls to write multiple versions of theclient/server script, the number of different clients' browsers andservers that can be supported almost limitless because each browser canbe supported in one or more DTCs. fEditors insert design-time controls,which allow a page to operate as an object (referred to as a “pageobject” or “P.O. DTC”) into the ASP files. These ‘P.O. DTCs’, wheninstantiated in an editor, provide the user interface which supports thedisclosed programming model reduced with naming requirements. When runin an editor, the P.O. DTC prompts the user for various informationregarding the file itself (e.g., “am I an object? What are my method andproperties?”). Thus, the page object is put onto the page by the user.The user interacts with the DTC's user-interface to indicate whatmethods and properties define the page as an object. As a result, theDTC generates the appropriate script (client-side or server-side).

[0038] As used herein, a persist operation refers to writing informationto a non-volatile storage medium where the information relates to thecurrent state of an object. The information written is such that, whenthe object is recreated in memory, the object can be restored to itsprevious state. Herein, an instantiate operation refers to creating aninstance of an object type in memory.

[0039] In one embodiment, the present invention uses a Component ObjectModel (COM) component thereby allowing the controls to be utilizedacross multiple applications. Advantageously, the present invention maybe implemented within any type of HTML editor, including but not limitedto, Front Page 98® and Visual InterDev 98® editors.

[0040] As used herein, ASP objects are generalized with the scriptingnamespace of page.method and page.property. The “page” is the ASP page.The “method” and “property” are those associated with the page, asspecified through the P.O. DTC.

[0041] The present invention may be utilized in applications thatrequire complex or lengthy scripting thereby alleviating the burden ondevelopers or programmers. Also, the programmer need not know all of thedetails necessary for scripting since the control of the presentinvention can perform the necessary scripting. Such applications mayinclude applications incorporating complex database controls, forexample.

[0042] The script generated by the Page Object DTC includes serverscript, which creates a JavaScript object. The JavaScript object isgiven the name that user assigned to the Page Object. That object maythen be referenced by script on the page whenever the public methods andproperties of the Page Object are to be accessed. For example, if theuser assigned the name ‘Statistics’ to the Page Object and wanted toaccess the ‘Totals” property, the user would write script thatreferenced the name ‘Statistics.Totals.’ Note that the script needed toconstruct the “Statistics' object was generated by the Page Object DTCat design time.

[0043] As noted above, the server script may be different from theclient script. Here, on the JScript proxy object is created for theserver side and one for the client side. These may be different sincethe methods and properties accessible in each domain may differ. Forexample, ASP page “Foo” contains three methods: A, B, and C. Thedeveloper makes A accessible on the client and server, makes Baccessible on the server, and C accessible on the client. The resultingserver proxy object would provide A and B methods, while the clientproxy object would provide A and C methods. Using the term “exposed” inthis example, the developer exposed A and B to the server and exposed Aand C to the client.

[0044] Methods exported by the Page Object according to the inventionare implemented as server methods. As the enclosed document describes,there are other methods associated with the Page Object which areautomatically available with the Page Object, but they are conventionalmethods which are available in the local ‘space’ (the document describesthe term ‘space’).

[0045] To simplify the programmer's task of navigating between pages,constructs such aswindow.location.href=page.asp?routing=shuffle&parameter1=value arereplaced by constructs such as page .navigate. shuffle (value), whichare more natural for a programmer.

[0046] Further, the editing environment may be modified to replace allscripting requirements with a “drag-and-drop” interface where each newobject is dropped into a page and, through the use of property andmethod pages, modified in accordance with the developers requirements.

[0047] In this case, the developer need never interact with the HTML;rather, the editor would convert the various objects intoclientside/serverside/ASPs scripts and pages as appropriate. The presentinvention may be implemented by any number of editors. Available editorsinclude, for example, Visual InterDev 98 and FrontPage 98 (by theMicrosoft Corporation).

[0048] These and other novel advantages, details, embodiments, featuresand objects of the present invention will be apparent to those skilledin the art from following the detailed description of the invention, theattached claims and accompanying drawings, listed herein, which areuseful in explaining the invention.

IV. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In the following text and drawings, wherein similar referencenumerals denote similar elements throughout the several views thereof,the present invention is explained with reference to illustrativeembodiments, in which:

[0050]FIG. 1 is schematic diagram depicting a computing environmentaccording to embodiments of the present invention;

[0051]FIG. 2 is a diagram of the various spaces according to embodimentsof the present invention;

[0052]FIG. 3 is a diagram of how an object may move across spacesaccording to embodiments of the present invention;

[0053]FIG. 4 is a user interface for placing an object on a pageaccording to embodiments of the present invention;

[0054]FIG. 5 is a state diagram for modification of an object across theserver/client boundaries according to embodiments of the presentinvention;

[0055]FIG. 6 is a representation of a first page treating a second pageas an object in accordance with an embodiment of the invention;

[0056]FIG. 7 is a flowchart illustrating the creation of a page in aneditor according to embodiments of the present invention;

[0057]FIG. 8 is a flowchart illustrating a method of navigating to a newpage according to embodiments of the present invention;

[0058]FIG. 9 is a flowchart illustrating a method for executing a methodon a page according to embodiments of the present invention;

[0059]FIG. 10 shows a variety of property pages associated with anobject page according to embodiments of the present invention; and,

[0060]FIGS. 11 and 12 show a property exchange feature according toembodiments of the present invention.

V. DETAILED DESCRIPTION

[0061] The present invention is described as it would be used forInternet applications, which is one embodiment of the invention. Thepresent invention, however, may be implemented generally within anynumber of computer applications including any software development toolfor authoring text and computer-executable code. In the context ofdeveloping web pages, the present invention provides a tool forefficiently authoring hypertext markup language (HTML) text and script.In this context, the present invention may be implemented within anauthoring tool such as, for example, Visual C++, Visual InterDev andVisual J++ by Microsoft Corporation of Redmond, Wash.

[0062] As used herein, HTML script is intended to include the variousscripting languages available for execution on browsers. The actualscripting language used when converting from the following programmingenvironment into the HTML environment may vary based on the browsers towhich the HTML code is to be eventually sent. Since the language,JavaScript is common to both Internet Explorer 4® (from Microsoft®Corporation) and Netscape Navigator 4 ® (from Netscape® Corporation),this language may be used. Other languages be used supported by anincreasing number of browsers are also becoming available.

[0063] Although not required, the invention will be described in thegeneral context of computer-executable instructions, such as programmodules. Generally, program modules include routines, programs, objects,scripts, components, data structures, etc. that perform particular tasksor implement particular abstract data types. Moreover, those skilled inthe art will appreciate that the invention may be practiced with anynumber of computer system configurations including, but not limited to,distributed computing environments where tasks are performed by remoteprocessing devices that are linked through a communications network. Ina distributed computing environment, program modules may be located inboth local and remote memory storage devices. The present invention mayalso be practiced in personal computers (PCs), hand-held devices,multiprocessor systems, microprocessor-based or programmable consumerelectronics, network PCs, minicomputers, mainframe computers, and thelike.

[0064] A. Order of Description

[0065] In order to comprehend more readily the embodiments of theinvention contained herein, the following lists the order of thecontents of the detailed description:

[0066] Terms;

[0067] General Purpose Computer;

[0068] Event Driven Server Model;

[0069] Object Lifetimes Exist Apart From Server;

[0070] Pages Treated As Objects;

[0071] Construction of Objects; and,

SUMMARY

[0072] B. Terms

[0073] The following terms are used throughout the specification torelate to various concepts. Four terms described below include designspace, composition space, and interaction space. A space is generally anexecution environment for a document (or page). Here, the term documentis used interchangeably with a page. Traditional examples include aclient space and a server space in a client/server model. As many“spaces” may reside on a single machine, a space is therefore distinctfrom an operating system process alone.

[0074] 1. Design Space

[0075] The design space is the environment in which a developer“designs” or creates a document. The design space is generally aworkstation separated from a web server. When the designer has completedwork on a document, the document is saved to a web server (or generallya “server”).

[0076] 2. Composition Space

[0077] The composition space is the environment generally resident on aserver. In the World Wide Web model, when an end user requests a page ordocument from a server, the server packages HTML and/or additionalcomponents and transmits them to the waiting client. In some cases, theserver stores an active server page or an ASP (from the MicrosoftCorporation or Redmond, Wash.). ASPs are generally pages of script whichrespond to a browser's request for information. For example, a browseron a client may request all statistics from a given year for a baseballteam. The ASP has access to the desired statistics as stored in anaccessible database. In response to the browser's request, the ASPretrieves the desired statistics from the database, formats theinformation into HTML, and transmits the HTML to the waiting browser,where the resulting information is displayed. Here, as the server iscomposing the pages or documents for the client, the server is referredto as the composition space.

[0078] 3. Interaction Space

[0079] The interaction space is the environment in which the clientinteracts with the received documents or pages, hence the term“interaction space”. Two general types of clients exist: dumb clientsand smart clients. The dumb client does not posses the capabilities ofhanding all instructions or tasks as desired in a pure distributedprocessing paradigm. Specifically, the client cannot handle all eventsgenerated in the interaction space and so needs to send them to theserver to have them handled by the server. The smart client, bycontrast, has the ability to appropriately hand the events generatedlocally on the client.

[0080] In some cases, even the smart client does not have allinformation available to it. For example, a designer may have electedwhen designing a document not to download all possible data sets as mostwould not be needed by the smart client. By so doing, the designer savesbandwidth while requiring the smart client, like the dumb client, to askfor additional information from the server. Client

[0081] 4. Design-Time Control

[0082] Finally, the design time control is a control (for example, anACTIVEX® control, of the Microsoft Corporation of Redmond, Wash.) thatallows a developer to place text or script in a document that alters orenhances the operation of the document.

[0083] Design-time controls are similar to embedded wizards that can becontinuously edited to modify the text they generate for a web page.DTCs take advantage of OLE design-time capabilities (including directmanipulations, property sheets, and persistence) to capture user inputs,thereby extending the capabilities of an editor which supportsdesign-time controls. Additional disclosure of design-time controls isdescribed in U.S. Ser. No. 08/959,300, entitled “Method and Apparatusfor Automatic Generation of Text and Computer-Executable Code”, filed onOct. 28, 1997, the contents of which are incorporated for any and allessential subject matter.

[0084] A design-time control differs from a general control in that itoperates only in an editor (or container) when a web site is beingdesigned or maintained. Once the web site is saved, the design-timecontrol may create (among other things) script for the client orserver/ASPs. As end users are limited to a small number of browsers andusing design-time controls to write multiple versions of theclient/server script, the number of different clients' browsers andservers that can be supported almost limitless because each browser canbe supported in one or more DTCs.

[0085] C. General Purpose Computer

[0086]FIG. 1 is a schematic diagram of a computing environment in whichthe present invention may be implemented. The present invention may beimplemented within a general purpose computing device in the form of aconventional personal computer 200, including a processing unit 210, asystem memory 220, and a system bus 230 that couples various systemcomponents including the system memory to the processing unit 210. Thesystem bus 230 may be any of several types of bus structures including amemory bus or memory controller, a peripheral bus, and a local bus usingany of a variety of bus architectures. The system memory includes readonly memory (ROM) 240 and random access memory (RAM) 250.

[0087] A basic input/output system 260 (BIOS), containing the basicroutines that help to transfer information between elements within thepersonal computer 200, such as during start-up, is stored in ROM 240.The personal computer 200 further includes a hard disk drive 270 forreading from and writing to a hard disk, not shown, a magnetic diskdrive 280 for reading from or writing to a removable magnetic disk 290,and an optical disk drive 291 for reading from or writing to a removableoptical disk 292 such as a CD ROM or other optical media. The hard diskdrive 270, magnetic disk drive 280, and optical disk drive 291 areconnected to the system bus 230 by a hard disk drive interface 292, amagnetic disk drive interface 293, and an optical disk drive interface294, respectively. The drives and their associated computer-readablemedia provide nonvolatile storage of computer readable instructions,data structures, program modules and other data for the personalcomputer 200.

[0088] Although the exemplary environment described herein employs ahard disk, a removable magnetic disk 290 and a removable optical disk292, it should be appreciated by those skilled in the art that othertypes of computer readable media which can store data that is accessibleby a computer, such as magnetic cassettes, flash memory cards, digitalvideo disks, Bernoulli cartridges, random access memories (RAMs), readonly memories (ROMs), and the like, may also be used in the exemplaryoperating environment.

[0089] A number of program modules may be stored on the hard disk,magnetic disk 290, optical disk 292, ROM 240 or RAM 250, including anoperating system 295, one or more application programs 296, otherprogram modules 297, and program data 298. A user may enter commands andinformation into the personal computer 200 through input devices such asa keyboard 201 and pointing device 202. Other input devices (not shown)may include a microphone, joystick, game pad, satellite dish, scanner,or the like. These and other input devices are often connected to theprocessing unit 210 through a serial port interface 206 that is coupledto the system bus, but may be connected by other interfaces, such as aparallel port, game port or a universal serial bus (USB). A monitor 207or other type of display device is also connected to the system bus 230via an interface, such as a video adapter 208. In addition to themonitor, personal computers typically include other peripheral outputdevices (not shown), such as speakers and printers.

[0090] The personal computer 200 may operate in a networked environmentusing logical connections to one or more remote computers, such as aremote computer 209. The remote computer 209 may be another personalcomputer, a server, a router, a network PC, a peer device or othercommon network node, and typically includes many or all of the elementsdescribed above relative to the personal computer 200, although only amemory storage device 211 has been illustrated in FIG. 1. The logicalconnections depicted in FIG. 1 include a local area network (LAN) 212and a wide area network (WAN) 213. Such networking environments arecommonplace in offices, enterprise-wide computer networks, intranets andthe Internet. When used in a LAN networking environment, the personalcomputer 200 is connected to the local network 212 through a networkinterface or adapter 214. When used in a WAN networking environment, thepersonal computer 200 typically includes a modem 215 or other means forestablishing a communications over the wide area network 213, such asthe Internet. The modem 215, which may be internal or external, isconnected to the system bus 230 via the serial port interface 206. In anetworked environment, program modules depicted relative to the personalcomputer 200, or portions thereof, may be stored in the remote memorystorage device. It will be appreciated that the network connectionsshown are exemplary and other means of establishing a communicationslink between the computers may be used.

[0091] D. Event Driven Server Model

[0092] The conventional web server model, active server page/cgi model,is a sequentially executing set of code. For designers, the conventionalweb server model is confusing at best because designers are generallymore comfortable with event driven models. For example, the conventionalway of coding a server includes the steps of sequentially code each lineto retrieve and operate on information. To sequentially code an ASP, thedesigner must have a secure grasp of what each and every component inthe ASP performs as well as how the components interrelate. A developermust be an expert in code and in script. To this end, the linearprogramming approach results in embedded HTML code in the ASPintermingled with logical script. The resulting ASP and sets of ASPs canbecome harder to organize and comprehend. Further, this text-streamingapproach to authoring does not work well in the WYSIWYG (what you see iswhat you get) environment as the standard ASP becomes increasinglydifficult to parse into different colors for an increasing number ofdifferent elements (server script, client script, server script whichgenerates client script, comments, text, and the like). Moreover, adesigner needs to readily comprehend the subtle differences betweenclient script and server script and the interaction between them.

[0093] As shown in FIG. 2, one aspect of the present invention relatesto alleviating the designing difficulty associated with the designing ofdocuments that are transported across the server/client transition. FIG.2 shows design space 1001 outputting a document or documents 1007 thatare stored in composition space 1002. While composition space 1002remains a serial execution environment 1005, the present inventionprovides an event driven model 1006 to ride on top of the serialenvironment 1005 so as to present the appearance of an event drivenmodel to the designer when designing in the design space. Accordingly,the designer may write code and script in the design space as theyrelate to each other in event driven relationships, while the underlyingparadigm for the server as serially executed remains conventional.

[0094] As also shown in FIG. 2, interaction space 1003 exists across theserver/client transition 1004. The conventional model requires in-depthknowledge of the differences between the two scripting environments 1002and 1003. By using the event-driven model of the present invention, thedistinction between the two scripting environments 1002 and 1003 is kepthidden from the designer, which in turn allows the designer toconceptualize the combination of the composition space 1002 and theinteraction space 1003 as a single unified environment. This singleenvironment makes the designer's task easier by allowing the event modelof the present invention to handle the scripting and coding for thecomposition side 1002 and the interaction side 1003 of the division1004.

[0095] An outgrowth of the event model as shown in FIG. 2 is therepresentation of conceptual objects moving between the various spaces.FIG. 3 shows the design space 1001, composition space 1002, andinteraction space 1003 as related to FIG. 2 and including object O_(A)1009. The concept of Object O_(A) 1009 placed on a document is createdin design space 1004 and ported to composition space 1002 throughtransition arrow 1010. When requested by a browser in the interactionspace 1003, the conceptual object O_(A) 1009 moves through transitionarrow 1011 to the interaction space 1003. For further modification orevent handling, conceptual object O_(A) 1009 moves through transitionarrow 1012 back to composition space 1002 based on an action or eventhaving occurred in interaction space 1003. While in the abstract, objectO_(A) 1009 moves intact between the various spaces 1001, 1002, and 1003,this abstraction is referred to as a conceptual object as the designermay simplistically view the object as moving between spaces while theevent model handles the complex coding to create the simplisticappearance of the transitioning object. The complex coding underlyingthe event model and the representation of an object moving betweenspaces is treated in greater detail below.

[0096] Programmers are generally accustomed to the Visual Basicprogramming model where a designer constructs a form as containingobjects with associated methods, properties, and events. Next, thedesigner writes Visual Basic code against the object to cross-link theobject with other objects on the form or application. In theconventional web model, objects are not used, but rather each page isserially written for placement on the serial execution server. Toalleviate the programming difficulties for the designer, one aspect ofthe invention provides a user interface that supports the inclusion ofobjects in a document as being “dragged-and-dropped” into position onthe page. For example, referring to FIG. 4, a text box object is to beincluded on a page. Array 1020 shows a grouping of objects that may beincorporated into page 1021. In this example, text box object 1022 isselected from array 1020 and dropped into position on page 1021.Surrounding deposited object 1023 is HTML code 1024. In one presentationof page 1021 to the designer, while the page 1021 is in design space,the representation of text box 1023 is not a listing of HTML code, butrather a visual representation of the text box (in this example, a boxwith text in it). Next, once the text box 1023 is on the page, thedesigner may assign properties to the text box 1023, perform variousmethods on the text box 1023 or on the contents of the text ox 1023, andassign relationships between other objects on page 1021 and text box1023.

[0097] This hiding of the code of the text box allows the designer to befree from the encumbrances of confusing amounts of code layered uponcode layered upon more code. Also, by not having the code for the textbox 1023 fixed by using a DTC, the DTC may respond to subsequent changeswithout having to be reconfigured for the page.

[0098] In one aspect of the invention, text box 1023 may be a designtime control that inherits information from its inclusion on page 1021and where it is included on page 1021 to create server/client script forthe page when stored in the composition space. The server/client scriptas stored in the composition space 1002 may have the actual HTML codefor the text box or it may generate the HTML code to represent the textbox object 1023 based on information received from the interaction space1003. In these two representations, if the HTML code is fixed in thecomposition space, then the representation of the text box may not bealtered by subsequent interactions in the interaction space 1003.However, if the composition space 1002 has a representation of text box1023 and the representation 1023 is responsive to data received fromanother source or retrieved from the server, then the text box may berecomposed in the composition space 1002 to conform to the receiveddata.

[0099] Through the use of DTCs, it is now easier to write applicationsfor server script or client script. In on aspect of the invention, aproperty value can be set, in this case, whether to be scripted on theserver or scripted on the client for the handling of an event. Thedecision where to send scripting is made at design time. In this case,the ability to set the scripting location (of to what space the scriptis directed) provides a number of advantages. In particular, the DTC maybe programmed with the appropriate scripting information so that whencreating code, the DTC can place the appropriate code in the correctlocation, alleviating this tedious coding task from the designer.

[0100] Also, another advantage in using DTCs to promote the programmingobject model is in linking the various controls in script is made easierthrough the use of DTCs. For example, the same code for an object cannotbe used in both the client and server. Rather, the client code shouldsend the event to the server code and the server code should handle theevent. So, the designer is faced with two runtime environments. Whileboth are performing related operations, the server code and client codeneed to interact so as to produce a unified result. In accordance withthe present invention, a DTC does not know what type of environment itwill be placed. Only when configured in design space and saved to theserver does the DTC operate to instantiate the correct scripting inorder to accomplish the goals of the original object. In the case, wherethe DTCs are configured to handle the events on the server, this may bereferred to as server binding as the event handling is bound to theserver. When the events are to be handled by the client, for example, inDHTML, this may be referred to as client binding as the event handlingis bound to the client.

[0101] Another advantage of DTCs is that one can set a DTC to inherentpart of its properties from the page that it is located. For example, ifthe page is intended to be a client-bound page, a designer need onlydrop the DTC onto the page in the design mode and allow the DTC toconfigure itself in accordance with the properties of the page in whichit is placed. Alternatively, the designer may want to specify the DTCsseparately, as some event handlings are more appropriate for the serverand others for the client.

[0102] It is noted that the composition space/interaction space objectsexist apart from the DTCs. DTCs are not required to implement thefeatures of instantiating an object. Rather, one can include a varietyof objects including use their methods, define their properties, andwrite script against them without using DTCs. An example of the use ofobject without the use of DTCs is through the existence of scriptinglibraries. Scripting libraries, also covered in greater detail below,are accessible libraries of script which allow one to include theobjects from the library in a page without using DTCs. While the endpage may be identical in the composition space or interaction space toone created through the use of a DTC, the DTC provides an abstractionfrom the text-streaming approach to creating pages to that of using aVisual Basic-type interface to drop objects on a page and define theirmethods and modify their properties on property pages and method pagesas controlled by the DTCs.

[0103] E. Object Lifetimes Exist Apart From Server

[0104] The objects addressed above conceptually move from space to spaceas shown in FIG. 3. While in some instances, the actual representationof the object may exist in the composition space 1002 (for example, aserver object), the conceptual object moves between spaces. To highlightthe features and operations of objects as they move between the variousspaces, FIG. 5 provides an example.

[0105]FIG. 5 shows composition space 1002 and interaction space 1003 asincluding a non-volatile memory 1030 in at least one of the two spaces1002 and 1003. An ASP page 1045 containing objects is stored innon-volatile memory 1030. The ASP page 1045 includes objects balloon,cube, and slab. These objects may have associated methods andproperties. In response to a request from a browser in interactionspace, the ASP page 1045 executes and instantiates (step 1031) theobject “balloon” with stored property information from non-volatilememory 1030 so as to create balloon, 1032. Balloon₁ 1032 is thentransmitted (step 1033) to interaction space 1003 and appears asballoon₁ 1034 with persistence information 1035. In this example, theobject balloon, 1034 is transmitted with its own code to interactionspace 1003. The persistence information 1035 that accompanies balloon₁1034 describes the properties of received balloon, 1034. Here, theproperties are (object number=1, color=red, radius=5). Next, in theinteraction space 1003, the browser receives an event 1036 (for example,a request to paint the balloon₁ 1034 blue). The balloon₁ 1034 has notchanged but, having received event 1036, is identified as balloon₁ 1035.The browser transmits (step 1038) the event 1036 to the compositionspace to handle the event. The information transmitted to thecomposition space 1002 include the event 1036 (paint blue) and thepersistence information 1035 which identifies the balloon₁ 1035 to theASP in composition space 1002. Next, the ASP re-instantiates (step 1039)the object balloon₁ as 1041 and handles the event 1036 (paint blue) instep 1040. The object balloon₁ is transformed into balloon₂ 1042. TheASP then transmits balloon₂ 1042 (in step 1043) back to the interactionspace 1003 with persistence information (object=1, color=blue, radius=5)1045. Finally, the balloon₂ is received as balloon₂ 1044 and displayedto user. In this example, it is noted that at least one advantage ofstoring the persistence information in the interaction space 1003 isthat the interaction space is the best place to maintain thisinformation.

[0106] When scaled for multiple users, the composition space wouldquickly be overrun by the significant amount of storage informationrequired to be saved to as to remember the exact properties (also knownas state information) of each object transmitted to a browser. Thepersistence information may be placed in each downloaded page at, forexample, at the bottom of the page in a hidden field such as <inputTYPE=HIDDEN NAME=“balloon” VALUE=“blue”>. Alternatively, a designer mayuse cookies to perform similar state monitoring and persisting.

[0107] In one embodiment of the present invention, part of the operationof FORM elements is he need for specification of page methods to invokewhen a FORM is POSTed to the page. A convention exists where DTCs on thepage create their normal FORM field of a given name, and they alsocreate a HIDDEN FORM field, which relates to the normal field name. Thefollowing is an example of the technique:

[0108] <INPUT TYPE=SUBMIT NAME=Cancel>

[0109] <INPUT TYPE=HIDDEN NAME=Cancel_Method VALUE=“CancelRequest”>

[0110] When this FORM is POSTed back to its original ASP file, the codegenerated by the Page Object DTC sees the Cancel field in the POSTinformation and look for the Cancel_Method field. If it finds such afield, it will use its value to determine which routine on the serverpage to invoke.

[0111] In the above case, the Page Object DTC becomes part of ascripting model that allows a developer to write code against the page.

[0112] Alternatively, it is contemplated that the initial instantiation(step 1031) may occur without a request from a browser, for example, forthe purposes of broadcasting or multicasting using a push web model.

[0113] Another example relates to reducing the size of a text box asdisplayed on the client every time a user makes a selection. As thisexample is similar to the states of FIG. 5, a new figure is not shown.First, the object is created on the server and its length is set to 10.Next, the object is sent to the client with the persistence informationidentifying the object and identifying the length of the boxes at 10.The client clicks a button, sending an onclick event to the browser. Thebrowser sends the onclick event with the persistence informationidentifying the object and the length (10) back to the server. Theserver reinstantiates the object, modifies its length, and sends it backto the client with new persistence information (object id, length=9),and the process repeats. Note here that, as above with the balloon, theserver does not need to remember what object the client has as well asthe properties of the object as the client may provide this informationback to the sever with each event firing. To this end, therepresentation of the object and all state information as modified bythe events is not stored on the server, but instead discarded as theclient has this information.

[0114] Further, the client does not need to retransmit the entire objectback to the server for event handling. Rather, the client may transmitthe identification of the object as the server has the re-instantiationinformation stored in non-volatile memory 1030.

[0115] It should also be noted that the type of code for the server andclient may be different. For example, the server may run JavaScript ormay run C++. So, the object may not only move seamlessly between spacesbut also be translated to different scripting languages appropriate foreach space (for example, JavaScript in the composition space and HTML inthe interaction space). Also, it should be noted that no user interfaceis needed in the composition space. Rather, the only user interfaceneeded is in the interaction space as there is generally no uservisually monitoring the instantiation of objects in the compositionspace. This monitoring is done on in the interaction space. In the aboveexamples, all event handling was destined for the composition space. Asthe smart client may in corporate some event handling, otherimplementations may have the client handling at least some events.

[0116] F. Pages Treated As Objects

[0117] Another aspect of the present invention is the paradigm of pagesimplemented as objects. Page Objects may be used in conjunction with ASPpages. In this sense, a page may have methods and properties associatedtherewith. Also, by considering a page as an object, a developer canhave a first page use a second page as if the second page were an objectwith associated methods and properties. To this end, the developer'sconception of a web project is translated to look more like a collectionof objects than a set of independent ASP pages. To this end, thecollection of objects appears to someone familiar with traditionalprogramming techniques as a collection of objects. The invention alsoincludes the use of standard web authoring and interaction techniques toprovide that same programmer with familiarity for inter-documentinteractions.

[0118] The page object aspect of the invention furthers the perceptionthat the composition and interaction stages of a document's lifetime arepart of a single object. Instead of hopping from document to document, asingle document is repeatedly composed and interacted with (itrepeatedly visits the composition and interaction spaces). The abilityto ‘hop’ between documents is retained, but that capability is presentedconsistent with the object-based metaphor that is familiar toprogrammers.

[0119] Central to the object-based metaphor is the notion that adocument has a name and that it has methods and properties. Methods maybe implemented in either the local space or in the composition space.Methods which are implemented in the composition space are available foruse in both composition and interaction spaces (e.g. navigate methods).Methods implemented in the local space are only available in the localspace (e.g. getState/setState). Properties are available in bothcomposition and interaction spaces.

[0120] As the conventional web custom composition of a page isconfusing, the page object aspect of the invention clarifies the meansfor customizing pages by standardizing on traditional programmingtechniques. The existence of a method on a document is a means ofrequesting custom composition of a page. The method is called, standardweb techniques are employed, and the page is recomposed according to theinstructions in the method. The invention ensures that this appearanceof ‘calling a method’ is maintained for the author of the document, tothe point of permitting by-value parameters to be passed to the method.

[0121] Also, as the conventional method of maintaining data associatedwith a web document is also confused, the page object aspect of theinvention clarifies the means by again standardizing on traditionalprogramming techniques. The existence of a property on a document is ameans-of storing data in association with that document. At least thisaspect of the invention ensures that the appearance of accessing aproperty on the document is maintained for the author of the document.This aspect of the invention also ensures that the property value ismaintained, is accessible and is modifiable in both composition andinteraction spaces.

[0122] Given the above, a document generally begins life in thecomposition space where it is initially composed (having been placedthere by a designer working in a design space). Next, the composeddocument is moved to the interaction space. If the interaction requiresrecomposition of the page (invocation of a document method), thedocument is moved back to the composition space where it is recomposed(as discussed above with respect to FIG. 5. The recomposed document ismoved back to the interaction space. This process repeats as many timesas is dictated by the document and the user interactions with thedocument.

[0123] A refinement of the overall model is that the composition andinteraction spaces can be implemented in a single process and that avariety of the interoperations between the two spaces become nulloperations. Thus, through the use of page objects, the composition spaceand implementation space may be considered as a single space.

[0124] The page object model of the invention also provides a means bywhich one document may request a transfer of execution to a differentdocument. This is accomplished by having one document reference anotherusing the invention at design time in the design space. The referencepermits the author to gain access to the methods of another documentfrom the current document. When the document is executing in either thecomposition or interaction spaces, it is possible for the document toinvoke a method implemented in a referenced document. When this happens,the referenced document becomes the new document that passes between thecomposition and interaction spaces. Because a method is employed,by-value parameters may be used to pass information between thedocuments. When the change between documents takes place, the originaldocument is discarded after saving the appropriate state information.

[0125]FIG. 6 is a representation of a first page treating a second pageas an object. “Page 1” 101, with the file name of page1.html, includesbutton 102. When button 102 is selected, “Page2” 103, with the file namePage2.asp is accessed. For instance, page2.asp may be an active serverpage which accesses a database, retrieves a statistics on a person,creates an HTML page to display the statistics, and transmits the HTMLpage to the requesting browser. An example-of the HTML representation ofthe script behind the button is as follows: <input name=buttonvalue=“press me” onclick=“page2.show( )”>

[0126] In the prior art, the HTML developer would have been forced torefer to page2.asp as a standard page. For example, the onclickparameter would have been represented as follows:

[0127] <onclick=“window.navigate.href=/windows/webpage2.asp”>

[0128] accessing page2.asp as stored in the windows/web directory. Thedifficulty experienced in referring to page2.asp as a new destination isthat the coding for the developer becomes increasingly complex withnumerous ASP files (the names remembered of whose files must be) andthat each ASP had to be selected separately. If two ASP files wererelated and only differed in a few ways, for example, if the differed interms of the number of fields that were searchable, then the two fileswould have to be coded completely independently of each other.

[0129] The addressing scheme of the present invention alleviates theprevious addressing difficulty by allowing pages to be treated asobjects (meaning that each page has its own transportable properties andmethods associated with it) as well as objects being defined on theaddressed pages themselves. In accordance with the invention, instead ofrequiring developer to separately code a new page 103 for each newbutton 102, the developer can embed objects in page2.asp and address theobjects individually. In this regard, the developer may refer to the“show” method of page2.asp directly in the HTML code of page1.html byconsidering page2.asp to be an object with “show” as one of its methods.

[0130] Referring to the ASP page as an object is referenced herein as an“ASP Object”. ASP object methods may be are implemented as standardscript methods. They may be implemented in any supported scriptinglanguage. All methods are implemented as server methods, and as aresult, require that the browser navigate to the page that implementsthe method. To make this clear to the developer, all exported methodsare available within a subobject on the page called ‘navigate’. Thisproduces an invocation syntax that looks like: page.navigate.method (p1,p2, etc)

[0131] As will be treated in greater detail below, the programming userinterface may present a list of all available methods available on atarget page. In order for programming model UI to present a list ofavailable methods, a Page Object DTC (placed at the top of each pageobject) scans the page for content when the page is refreshed oraccessed and parses the uncovered methods to eventually create a list ofscript content in the page. From this parsing, the DTC provides ascripting model against which one can write code as including themethods found on that page. Next, this knowledge of a Page Object DTCmay be accessed by other pages. For example, if a developer is adding areference to page2 from page1, the developer is interacting with the DTCon page1. When the reference (to page2 from page1) is added, the page1DTC will examine the contents of page2, and locate the Page Object DTCinformation in that file. Next, it will instantiate the page2 PageObject DTC and retrieve from it a list of its object model elements.

[0132] As will be described with respect to FIG. 7, the developed page 1101 is converted from the object-oriented programming environment intoan HTML environment so as to be compatible with the various servers andclients to which page 1 101 is to be eventually sent. To this end, theopportunity for a developer to design in one environment, with thecreated pages later converted into a less-friendly HTML environment,enables the developer to relate scripts in a natural, object-orientedway, while preserving all functionality afforded by HTML script to endservers and end users.

[0133] An example of how the functionality of page 1 101 and page 103may be implemented is as follows. The developer can place the functionpage2.show(“Bob”), assuming one wants to look at an image of Bob, on theclient's page. When interpreted into HTML script, the following wouldreside on the client's page:

[0134] <onclick=“window.navigate.href=file://c:\windows\web\page2.asp?name=Bob”>.

[0135] This representation is invisible to the client; the client onlysees the button with the label “press me”. Once pressed, the activeserver page receives the request for Bob's image in a recognizableformat. This representation is also invisible to the developer; the lastcall the developer saw for this function was page2.show(“Bob”). Sincethe conversionh is invisible to the developer and end user, all aspectsof the HTML standard (for example HTML 4.0) may be exploited withoutmodifying the standard to accommodate the enhanced development objectoriented interface. A similar implementation is available for postingdata via the POST feature of HTML, which sends back name-value pairs tothe active server page.

[0136] The posting of the string ‘Bob’ is accomplished by composing aURL for the overall method invocation (e.g. page2.navigate.show(‘Bob’)might become ‘Page2.asp?_method=show&pcount=1&p0=Bob’) and the URL isplaced into a hidden field on the page. The hidden field is representedby the HTML “<INPUT TYPE=HIDDEN NAME=_method>”. Setting the value ofthat hidden field is represented by the script“document.thisForm._method.value =‘Page2.asp?_method=show&pcount=1&p0=Bob’”. Posting the information is accomplished by submitting theform element on the HTML page. That is accomplished via the script“document.thisForm.submit( )”. When the submit method is invoked ondocument.thisForm, all HTML input elements' names and values arecollected together and sent in the form of an HTTP POST request to thedestination URL. In this case, the destination URL may generally be thecurrent page. The browser next re-requests the current page by sendingthe POST request, and the current page then unpacks the submittedinformation and decides what to do with the unpacked information. If thecurrent page determines that “_method name” is represented in thatinformation (because the _method hidden field had its value set beforethe POST), then the page will tell the browser to navigate to the URLindicated by the method value. In this case, the new page is“Page2.asp?_method=. . . ”. The browser sends a GET request to theserver, asking for the content associated with that URL, and the servercomposes the page and sends it to the browser. By using the page objectmodel of the present invention, a developer is shielded from coding therelationships. Rather, by using the page object metaphor, the designerwrites code to methods in pages and the scripted interaction, asdescribed above, is isolated from the detailed coding required to makedetailed ASP pages work.

[0137] The implementation of the page2.navigate.show method on theclient performs all the work leading up to document.thisForm.submit( ).Also, if a navigate is performed on the server, a POST is not performed.The reason for the POST is to carry the state information beingmaintained about the page from the client to the server, thus keepingintact the illusion of a single object which exists in either thecomposition space (the server) or the interaction space (the browser).So in the case of a server-side navigate method call, a POST is notnecessary because the page state information does not need to goanywhere. When the method is invoked, the page cleans itself up bynavigating to a new page.

[0138]FIG. 7 is a flowchart illustrating the creation of a page in aneditor. In this example, the developer is editing pagea.asp. Pagea.asphas a design-time control Page Object that provides a number of propertypages, including, for example, a general property page, a methodsproperty page, a properties property page, and a reference propertypage. In this example, the general property page of pagea.asp mayinclude the name of the pagea.asp (in this case, “apple”). Accordingly,pagea.asp may be referred to as “apple” by other pages. For a showmethod on “apple”, it may be referenced as apple . show ( ).

[0139] To allow one page to access a second page's methods andproperties, the first page creates a reference to the second page. Thereference causes the client and server script to be added to the firstpage, which will instantiate the desired proxy objects (as predefined inthe second page) upon execution of the first page. In particular, whenthe reference is added, the design-time control of the first page, inone embodiment, locates the design-time control of the second page.Next, the first design-time control instantiates the second page'sdesign-time control and ask for a description of the second page'sobjects. The information returned from the second page's design-timecontrol is finally incorporated into the first page's design timecontrol.

[0140] The constructor code (a code which is placed into one file thatacts as a proxy for another file) assists with the use of the pageobject model. The constructor code (may be referred to by thenomenclature xxxxx-ctor) enables a proxy representation of the targetpage in the current page so that the designer can reference the objectsof the target page.

[0141] Note that the current implementation is set up such that ifPage1.asp is a page object, then it contains specially formatted text(known as XML) which describes the page as an object. At design time,another page which is loaded into the editor (and, therefore, has liveDesign Time Controls in it) can inspect the contents of Page1.asp todetermine what its methods and properties are and allow other pages tohave code written against it.

[0142] These property pages are described in detail in FIG. 10, below.In addition to the provided property pages mentioned above, it isrecognized that additional property pages may be added as needed toincorporate other object information or other non-object information foreach page. Likewise, property pages can be deleted when the environmentdoes not need every separate page.

[0143] While editing “apple” in step 301, the developer referencespageb.asp (step 302). Noting that pageb.asp does not exist, the editorcreates pageb.asp in step 303. Created pageb.asp is shown as page 310.After step 303, the editor inserts a Page Object DTC 311 into pageb.asp310 in step 304. Next, if possible, the editor can attempt to populatethe fields of the various property pages of new pageb.asp. Otherwise,the editor prompts the developer to describe the various methods andproperties (and other information) relevant to pages (step 305). Theeditor may then prompt the developer for objects 312 (with methods eat,sleep, fly) to be included on page 310 (step 306). For the inclusion ofobjects, the developer may drag-and-drop in old objects to create a newcollection of objects on the page 312. As indicated by dotted lines,next step may be included to describe the methods and properties of eachnew object 312 on the page 310 (step 307). The developer then proceedsto save the modifications made to the various pages (pagea.asp,pageb.asp) (step 308). The editor processes the DTCs to createappropriate scripts in new client and server pages and ASPs (step 309).

[0144] While FIG. 7 relates primarily to creating a new page with newmethods and properties, it is clear that creating a new page fromexisting pages is similar. In creating a new page from existing objects,one incorporates the existing objects into the current page. The editorperforms most of the functions of incorporating the referenced objectsinto the new page. For example, all object properties and methods may beentirely incorporated. Alternatively, the editor may step the developerthrough each method and property of the new object to allow thedeveloper to modify the properties and methods as they are incorporatedinto the object of the new page. An HTML example of a new ASP file is asfollows:

[0145] [scripting model start code]

[0146] [Page Object DTC] <HTML> <HEAD> <META NAME=“GENERATOR”Content=“Microsoft Visual InterDev 1.0> <META HTTP-EQUIV=”Content-Typecontent=“text/html; charset=iso- 8859-1”> <TITLE>Document Title</TITLE></HEAD> <BODY> <!--HTML is inserted here--!> </BODY> </HTML> <%scripting model end code %>

[0147] In this example, the call to the EndPageContent( ) methodterminates the page.

[0148] This page will eventually contain, or be referred to as, anobject. To explain how the objects between pages can interrelate, theinteractions with respect to methods and properties are now described.

[0149] First, methods may be implemented as standard script models inany supported scripting language. Methods may interact in one of twoways: the method may require navigation to a new page or may be executedin the background and keep the end user's browser on a given page. FIGS.8 and 9 describe these processes in detail from the browser'sperspective.

[0150]FIG. 8 shows the receipt of a page in step 401. Next, the end userselects a method with the name of <foo.navigation.method( )> (relatingto file foo) in step 402. The browser unloads the current page (step403), grabs the new page foo with its method method (step 404) and runsthe new page (405).

[0151]FIG. 9 relates to the execution of a method with no new navigationin the client's browser. FIG. 9 shows the receipt of a page in step 401.Next, the end user selects a method with the name of <foo.execute.method( )> in step 502. In contrast to step 403, the browser keeps the currentpage (step 503), and grabs the new page (504), which accesses the methodmethod. Finally, while the method method may be running elsewhere (or itmay be running on the client), the client's browser receives the datagenerated by the method and returns them to the currently running page(505). To the extent that information is displayed by the new method,the method effectively appears to run in the current page.

[0152]FIG. 9 may be understood with relation to the following example: abrowser has downloaded a page with various fields for entry of variousbaseball players' names along side a reserved field. The end user nextselects the name of player Bob and transmits “Bob” to the server storingBob's information. Instead of dumping the current page with the fieldbearing the data “Bob”, the browser keeps the current page and populatesthe reserved field with the new information (for example, Bob's battingaverage). Before the current invention, previous web page developers hadto create complex cookie sets for storing the entered informationlocally then repopulating cleared fields with cookie information.Alternatively, previous web page designers had to store the uploadedfields on a server temporally, repackage the stored information into anew page with the retrieved information, and download the combined webpage. To this end, developers were hampered by the complex temporarydata storage tasks needed to handle even the smallest of queries. Withthe present invention, the temporary storage problem is minimized, ifnot eliminated.

[0153]FIG. 10 shows how the property pages may be ordered in a DTC pageobject 602 of a page 601. The DTC 602 supports three property pages: amethods property page 604, a properties property page 605, and areference property page 606. Each property page has information that canbe toggled according to the developer's wishes.

[0154] The method property page 604 indicates that page 601 containsthree methods in it. The methods include “eat”, “sleep”, and “fly”. Theproperty page 604 also indicates where the methods may be exported. Theexportation and the accessibility may be switched between choices. Forexample, the eat method may be exported to both the server and theclient, the sleep method may be exported to the client only, and the flymethod may be exported to the server only. Also, the eat method may beaccessible from both the client and the server, the sleep methodaccessible from the client only, and the fly method accessible from theserver only.

[0155] As used herein, being “exported” means that a method (implementedwithin the page on the server) should be accessible in some way eitheron the client or on the server. Being “accessible” from the client orthe server means that contributions to the namespace of either theclient or the server appear so that the method can be called from theclient or the server. In particular, a proxy method is provided and iscallable from script, which will navigate or redirect a browser to theproper URL.

[0156] One example of the implementation simply allows the designer toexport a method. As disclosed herein, the method may be accessible fromboth client and server. An example of this accessibility is for the userto implement a “fly” method, go to the Page Object Methods propertypage, and add that method to the Navigate Methods grid. On the page,script can then call “thisPage.navigate.fly” in both the composition(server) and interaction (browser) execution spaces. Note, the firstfour lines through “%>” represent an example of the scripting modelstart code. <%@ Language=VBScript %> <% ‘ VI 6.0 Scripting Object ModelEnabled %> <!--#include file=“_ScriptLibrary/pm.asp”--> <% ifStartPageProcessing( ) Then Response.End( ) %> <FORM name=thisFormMETHOD=post> <HTML> <HEAD> <META name=“VI60_DTCScriptingPlatform”Content=“Client (IE 4.0 DHTML)”> <META NAME=“GENERATOR”Content=“Microsoft Visual Studio 6.0”> <SCRIPT LANGUAGE=vbscriptRUNAT=Server> Sub fly( ) ‘ do nothing End Sub </SCRIPT> </HEAD> <BODY><!--METADATA TYPE=“DesignerControl” startspan <OBJECTclassid=“clsid:8CC35CD6-E98B-11D0-B218-00A0C92764F5” id=PageObject1style=“LEFT: 0px; TOP: 0px”>   <PARAM NAME=“ExtentX” VALUE=“4233”>  <PARAM NAME=“ExtentY” VALUE=“1508”>   <PARAM NAME=“State”VALUE=“(ObjectName_Unmatched=\qPatent\ q,NavigateMethods=(Rows=1,Row1=(Name=\qfly\q,Parameters_Unmatched=\q0\ q)),ExecuteMethods=(Rows=0),Properties=(Rows=0),References=(Rows=0))”></OBJECT> --> <SCRIPTLANGUAGE=JavaScript RUNAT=SERVER> /* VIPM PAGE DESCRIPTION <DSCNAME=“Patent”>  <OBJECT NAME=“navigate”>  <METHOD NAME=“fly”SCENARIOS=“CLIENT,SERVER”/>  <METHOD NAME=“show”SCENARIOS=“CLIENT,SERVER”/>  </OBJECT> </DSC> VIPM PAGE DESCRIPTION */</SCRIPT> <% Sub [_PO_OutputClientCode] ( ) %> <SCRIPTLANGUAGE=JavaScript> if (typeof Patent_onbeforeserverevent == ‘function’|| typeof Patent_onbeforeserverevent == ‘unknown’)  thisPage.advise(‘onbeforeserverevent’, ‘Patent_onbeforeserverevent()’); Patent = thisPage; Patent.location = “Patent.asp”; Patent.navigate= new Object; Patent.navigate.fly = Function(‘thisPage.invokeMethod(“”,“fly”, this.fly.arguments);’); Patent.navigate.show =Function(‘thisPage.invokeMethod(“”, “show”, this.show.arguments);’);</SCRIPT> <% End Sub %> <SCRIPT LANGUAGE=JavaScript RUNAT=SERVER>function _PO_getClientAccessor(serverValue) {   if (serverValue == null)   return ‘null’;   return ‘unescape(“‘ + escape(serverValue) + ’”)’; }function _PO_ctor( ) {   thisPage.getClientAccessor =_PO_getClientAccessor; Patent = thisPage; Patent.location =“Patent.asp”; Patent.navigate = new Object; Patent.navigate.fly =Function(‘return fly( );’); Patent.navigate.show = Function(‘return;’);  thisPage._objEventManager.adviseDefaultHandler (‘Patent’, ‘one nter’);  thisPage._objEventManager.adviseDefaultHandler(‘Patent’, ‘one xit’);  thisPage.registerVTable(thisPage.navigate, PAGE_NAVIGATE); } function_PO_dtor( ) { if (thisPage._redirect == ‘’)   _PO_OutputClientCode( ); }</SCRIPT> <!--METADATA TYPE=“DesignerControl” endspan--> <P>&nbsp; </P></BODY> <% ‘ VI 6.0 Scripting Object Model Enabled %> <%EndPageProcessing( ) %> </FORM> </HTML>

[0157] The following sample of the above allows both the server andclient to access the method. <DSC NAME=“Patent”>  <OBJECTNAME=“navigate”>  <METHOD NAME=“fly” SCENARIOS=“CLIENT,SERVER”/> <METHOD NAME=“show” SCENARIOS=“CLIENT,SERVER”/>  </OBJECT> </DSC>

[0158] As with the methods property page 604, the properties propertypage 605 shows various characteristics of the properties. Here, threeproperties are on page 601: run, walk, and jog. The attributes includethe type of property (session, page or application), the type of access(read-only, read/write), and to where the property exported/accessed.Other objects may not be contained within page 601. However, they may bereferenced via placement in the reference page 606. To include an objectin the page, the developer may drag and drop an object into thereference page and have all methods and properties includedautomatically. Finally, the general property page 603 relates to generalinformation about page 601 (for example, its name).

[0159]FIGS. 11 and 12 show a property exchange feature according toembodiments of the present invention. A property may be declared by thedeveloper as being part of the ASP object, while its value may be storedin a server-side location. Alternatively, the values of the property maybe stored in said ASP object itself.

[0160]FIG. 11 shows an ASP proxy object 704 located on server 701. Whenan ASP object is loaded by a server, the property values are retrieved706 (from wherever they are stored 703) and are placed into the proxyobjects properties 704. Also, the proxy object's properties for theclient are prepared and stored in ASP object 704 as well. Duringconstruction of the page, the proxy objects' properties may be accessedand modified by the server script. If modified, the properties may besent back to the data storage 703 for future retrieval.

[0161] When the page is delivered to the client 702 by data flow 707,the page properties are transmitted to the client as well. Generally,the properties of the objects sent to the client are marked read-only(meaning that server 701 will not accept any modifications of theproperties from the client 702). The read-only status was previously setby the developer in the properties property page 605 of FIG. 6.

[0162]FIG. 12 relates to the posting of modified property informationback to data storage 703. If the page property is marked read/write, themodified property is transmitted back to server 701, for example, by theclient navigating to a new page or by posting 801 its data to the newpage. Once the new page on the server receives the updated information,the modifications are combined and transmitted 802 to data storage 703.

[0163] In general, a page property is referred to aspage.property=<%=server location%>. At least three server locations maybe supported. The locations are referred to as the “lifetimes” of theproperties. The three locations include on a page, in a session, and inan application. The term “on the page” means that the property isinitialized to the null string when the page is composed. When the pageis completed, no action is taken to modify the property. The sessionproperty is initialized from the session variable when the page iscomposed. When the page composition is complete, the session variable isupdated. In the application location is treated the same as the sessionvariable.

[0164] During normal operation of an ASP Object, a page is composed,delivered to the browser, run and then client script causes the browserto navigate to a new page, possibly another ASP Object. The browseradvances to the desired page immediately. No changes to state by theclient are automatically propagated back to the server. If the developerneeds to move state back to the server, it may be manually coded usingFORM elements, cookies, etc.

[0165] If the developer requests it, the programming model can operatesuch that changes to state can be sent back to the server. The operationof an ASP Object in this mode is the same as above, except that whenclient script is invoked to advance to the next page, the page state iscollected, then it is delivered to the same page using a FORM POST, thestate information is saved and then a redirect is used to advance thebrowser to the desired page.

[0166] The following provides examples of the invocations of the varioustechniques mentioned above as compared to conventional programmingpractices.

[0167] a) Method Invocation

[0168] When navigating from one page to another or even back to the samepage, a conventional technique is to place one of the followingconstructs onto the page: <SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick() window.location.href = “reports/topscores.asp?category=baseball&start=1936&end=1945” End Sub </SCRIPT> or <AHREF=“reports/topscores.asp?category=baseball&start=1936&end=1945”>Baseball Scores</A>

[0169] Both constructs involve reacting to some user action to cause thebrowser to move to a new page or to revisit the current page. Theconstructs get more involved when variables are used as part of thedestination URL: <SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( ) parameters = “?category=” & catCurrent  parameters = parameters &“&start=” & datStart  parameters = parameters & “&end=” & datEnd window.location.href = “reports/topscores.asp” & parameters End Sub</SCRIPT>

[0170] The complications continue if a parameter is to be completelyomitted: <SCRIPT LANGUAGE=VBSCRIPT> Sub button_onclick( )  parameters =“?”  If Not IsNull(catCurrent) Then  parameters = “category” &catCurrent  End If  If Not IsNull(datStart) Then  parameters =parameters & “&start=” & datStart  End If  If Not IsNull(datEnd) Then parameters = parameters & “&end=” & datEnd  End If window.location.href = “reports/topscores.asp” & parameters End Sub</SCRIPT>

[0171] The page object model aspect of the current invention collapsesall of this into a single, programmatic notation: <SCRIPTLANGUAGE=VBSCRIPT> Sub button_onclick( ) TopScores.navigate.show(catCurrent, datStart, datEnd) End Sub </SCRIPT>

[0172] The significant information is passed to a routine on an objectthat represents the file “reports/topscores.asp”. That object is called“TopScores” and was explicitly named by the web site author. The “show”method was also explicitly created by the author of the “TopScores”page.

[0173] The invention includes capabilities, which are common toprogramming tools, such as ‘statement completion’. This is an aid thatis provided to the author where as the method invocation is typed,prompts are presented which describe the available choices at a givenpoint. Those prompts include a list of methods available and, once amethod is selected, a list of the parameters that should be passed tothe method.

[0174] Internal to a method invocation supported by the invention, thesame sort of operation performed in the samples above is accomplishedbehind the scenes. The parameters are converted to text, concatenatedtogether as appropriate into a URL and then that URL is contained in theinformation sent to the composition space. Once received, theinformation is unpacked and the actual method, which exists in thecomposition space, is invoked. The invocation is actually morecomplicated than that and a number of other operations are intermingledwith the ones described. However, the essentials are covered by theabove.

[0175] b) Property Management

[0176] There are four aspects to managing property information on a webpage: access in the composition space, propagation to the interactionspace, access in the interaction space, and propagation to thecomposition space.

[0177] Each of these four aspects requires a specific technique ortechniques, and the resulting content in the authored page can be nearlyimpossible to maintain. Because the invention considers all four aspectsto be part of a single problem, the invention presents the singleconcept of a page property to solve that problem.

[0178] A page property is created by an author. The author chooses thename of the property, how it may be accessed in the composition andinteraction spaces (read-only versus read-write, etc), and its‘lifetime’. The lifetime is a statement of where the data of theproperty should be officially stored. There are three lifetimes: page,session and application. The notion of ‘forever’ would be anotherlifetime that might suggest storage in a database on the server. Theinvention does not provide an implementation of a ‘forever’ lifetime,but it is easily within the scope of the invention.

[0179] The invention provides access to property values via ‘get’ and‘set’ methods. Those methods are referenced as

[0180] variable=TopScores.getproperty( )

[0181] TopScores.setproperty(variable)

[0182] This notation is used identically in the composition andinteraction spaces.

[0183] (1) Access in the Composition Space

[0184] Script running during composition retrieves the latest value fromthe appropriate storage location at the beginning of page compositionand automatically stores changes to that location as changes are made.All access is accomplished via getproperty and setproperty methodsassociated with the page object.

[0185] (2) Propogation to the Interaction Space

[0186] Script running at the end of the composition phase outputs scriptthat provides the necessary object model in the interaction space. Thatscript includes the values of the various pieces of data as initializersto internal variables. Also output are a set of hidden input fields thatwill be used in item 4 below.

[0187] (3) Access in the Interaction Space

[0188] As with the composition space II access is accomplished viagetproperty and setproperty methods associated with the page object.

[0189] (4) Propagation to the Composition Space.

[0190] As changes are made to properties via setproperty methods in theinteraction space, the changed values are stored in the hidden inputfields created in item 2. When the user interacts with the page suchthat a method in a page should be executed, the property values arepropagated back to the composition space by posting the current page'sFORM element. That post operation causes the hidden input fields to besent to the composition space where they are unpacked and stored in theappropriate data storage, as well as being made available to a new passthrough the composition space—starting with item 1.

[0191] There are sufficient controls provided by the invention that anauthor can control a variety of aspects of data management, includingpermitting access only within the composition space or access onlywithin the interaction space, etc.

[0192] c) Controlling Composition

[0193] The invention changes the normal pattern of page composition ofan ASP. That is, it takes advantage of the very general page compositionapproach used, and creates a more specific approach. The standard ASPpage composition technique is to process the page from the beginning tothe end, generating output as the page is processed. The inventionintroduces a variety of notions, including ‘events’ that are fired atthe beginning and end of page composition. Also part of the invention'sinnovations is the execution of a page method as described above.

[0194] The composition process of a page object may follow these steps:

[0195] 1. Run all constructors defined on the page. Constructors areusually added to the page by Design Time Controls, which leverage theinvention's page composition model.

[0196] 2. Fire the oninit event, completing any initialization stepsthat could not happen in the construction phase. As above, oninit eventhandlers are usually added to the page by Design Time Controls.

[0197] 3. Fire the onenter event, which is usually implemented by thepage author and permits execution of page initialization operations.

[0198] 4. Invoke the requested method on the page.

[0199] 5. Complete conventional processing on the page. This means thatthe page is processed from beginning to end as a conventional ASP would.There are controls provided by the invention to skip this step, which isusually what happens when the requested method generates the completeresponse that would normally be generated by processing the page.

[0200] 6. Fire the ‘onexit’ event.

[0201] 7. Run all destructors defined on the page. As with theconstructors, destructors are usually added to the page by Design TimeControls.

[0202] Various objects may be incorporated into the scripting librariesas discussed above. The objects and their definitions may include:

[0203] Page—Allows developers to treat ASP pages as objects withmethods, properties, and events

[0204] Recordset—Supports data-binding to an ADO recordset using theData Environment

[0205] Textbox—A data-bound textbox

[0206] Label—A data-bound label

[0207] Listbox—A data-bound listbox with static or data-bound lookupvalues

[0208] Button

[0209] RSNavBar—A set of buttons for navigating through a list of items

[0210] Checkbox

[0211] OptionGroup

[0212] The sections below show some examples of web programming tasksand how the SOM makes implementing them easier and simpler. The samplesare not intended to illustrate real-world applications but rather thekinds of implementation issues web programmers face.

(1) Processing User Input on the Server

[0213] This sample page implements two textboxes, a listbox, and button.The user enters numbers in two textboxes, selects an arithmeticoperation, clicks the button to post the form, and then server scriptperforms the operation on the numbers and shows the result. The pagealso preserves the data the user entered when the page is regeneratedafter the post.

[0214] Below is a version of this page implemented using traditional ASPprogramming: <% Dim Result, Operation Dim Value1, Value2 Dim HaveResultValue1 = 1 Value2 = 1 HaveResult = False IfRequest.ServerVariables(“REQUEST_METHOD”) = “POST” Then  Value1 =CInt(Request.Form(“text1”))  Value2 = CInt(Request.Form(“text2”))  Op =CInt(Request.Form(“select3”))  HaveResult = True  Select Case Op  Case10:   Result = Value1 + Value2   Operation = “ plus ”  Case 20:   Result= Value1 − Value2   Operation = “ minus ”  Case 30:   Result = Value1 /Value2   Operation = “ divided by ”  Case 40:   Result = Value1 * Value2  Operation = “ times ”  End Select End If %> <form method=POST> Number1:<input type=text name=text1 value=“<%=Value1%>”><br> Number 2:<inputtype=text name=text2 value=“<%=Value2%>”> <select name=select3> <optionvalue=10 <% If Op = 10 Then Response.Write “SELECTED” %>>Add</option><option value=20 <% If Op = 20 Then Response.Write “SELECTED”%>>Subtract</option> <option value=30 <% If Op = 30 Then Response.Write“SELECTED” %>>Divide</option> <option value=40 <% If Op = 40 ThenResponse.Write “SELECTED” %>>Multiply</option> </select><br> <inputtype=submit value=“Submit”> <% If HaveResult Then  Response.Write(“<p>”& Value1 & Operation & Value2 & “ is ” & Result & “</p>”) End If %></form>

[0215] To a designer familiar with conventional programming languageslike Visual Basic or Java, this simple application appears confusing. Tounderstand how to build a page like this, the developer is required tohave a deep level of understanding about the interaction between the webserver and browser and how HTML forms posting works. This programmingmodel also cannot be easily represented in a visual rapid applicationdevelopment model, which leaves the developer hand-coding the page.

[0216] Compare this to the same sample created with the scripting objectmodel using DTCs: <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT> SubthisPage_onenter( )  If thisPage.firstEntered Then   TextBox1.value = 1  TextBox2.value = 1   ListBox1.addItem “Add”, 10   ListBox1.addItem“Subtract”, 20   ListBox1.addItem “Divide”, 30   ListBox1.addItem“Multiply”, 40   ListBox1.selectByValue (10)   End If End Sub SubButton1_onclick  Dim Result  Dim Value1, Value2  Value1 =CInt(TextBox1.value)  Value2 = CInt(TextBox2.value)  Select CaseCInt(ListBox1.getValue( ))  Case 10:   Result = Value1 + Value2  Operation = “ plus ”  Case 20:   Result = Value1 − Value2   Operation= “ minus ”  Case 30:   Result = Value1 / Value2   Operation = “ dividedby ”  Case 40:   Result = Value1 * Value2   Operation = “ times ”  EndSelect  Label1.setCaption(Value1 & Operation & Value2 & “ is ” & Result)End Sub </SCRIPT> Number 1: [TEXT BOX1] <br> Number 2: [TEXT BOX2][MENU] <br> [SUBMIT BUTTON] <p> [LABEL1] </p>

[0217] The above sample may be quickly created by dragging a fewcontrols into the editor and creating two eventhandlers—thisPage_onenter, which is fired when the user first navigatesto the ASP page, and Button_onclick.

(2) Navigating to a Server Method on a Page

[0218] The script fragments below show a conventional way of passinginformation to a server page by building a query string into the URLpassed to the server: PAGE1.ASP:   <%   Response.Write(“<A  HREF=””page2.asp?function=ProcessQuery1&parm1=” & parm1 &   “&parm2=”& parm2 & ””>Start Query 1</A>”)   Response.Write(“<A  HREF=””page2.asp?function=ProcessQuery2&parm1=” & parm3 &   ””>StartQuery 2</A>”)   %> PAGE2.ASP   <%   parm1 = Request.QueryString(“parm1”)  parm2 = Request.QueryString(“parm2”)   func =Request.QueryString(“function”)   If func = “ProcessQuery1” Then    ‘code for the first operation     Else       ‘code for the secondoperation     End If   %>

[0219] This process may be quickly complicated as the number of possibleoperations and parameters increases.

[0220] Through the Page object, the scripting object model provides ageneral-purpose way of publishing methods on a page so they can beinvoked from client script on the current page or on other pages thatreference the current page. The Page Object DTC provides a graphical wayto publish methods using the Page object. The script fragments belowshow the same functionality implemented using the Page Object:PAGE1.ASP:   <%   Response.Write(“<A  HREF=’Javascript:page2.navigate.ProcessQuery1(parm1,   parm2)’>StartQuery 1</A>”)   Response.Write(“<A  HREF=’Javascript:page2.navigate.ProcessQuery2(parm3)’>Start   Query2</A>”)   %> PAGE2.ASP   <SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>   SubProcessQuery1(parm1, parm2)     ‘code for first operation   End Sub  Sub ProcessQuery2(parm1)     ‘code for second operation   End Sub  </SCRIPT>

[0221] The two methods on PAGE2 were published using the Page ObjectDTC, and a reference to PAGE2 was made from PAGE1 also using the PageObject DTC, to make those methods available in the SOM on PAGE 1. Theresulting code is simpler and far more readable than in the firstexample because it uses a more familiar programming model.

(3) Remote Execution of a Server Method

[0222] Another example is remote scripting. The Page object allows adeveloper to publish a method on a page that can be called synchronouslyor asynchronously from the client without posting a form. This allows aweb page to remain live in the browser while a script function on theserver is called and returns a value. The call can be synchronous;blocking until the remote call completes, or a callback function can beprovided to process the function's return value asynchronously. Remotemethod calls can save bandwidth and reduce server load by avoiding thecost of regenerating the entire page after a post and sending it to thebrowser.

[0223] The sample below shows an asynchronous remote scripting call thatpasses a user name to a server script function that returns thecorresponding user id. A callback function processes the return valueand navigates to a members page if the user id is valid. [PAGE OBJECT]<% Function Lookup (name)   Lookup = dbLookupUser(name) End Function %><SCRIPT> function ProcessResult (rscb) {   if (rscb.return_value == −1)    alert(“You do not have a valid user id.”)   else    Members.navigate.LoginUser(rscb.return_value); } </SCRIPT> <INPUTTYPE=TEXT NAME=UserName VALUE=””> <BUTTON NAME=Enter VALUE=“Enter”ONCLICK=’thisPage.execute.Lookup(thisForm.UserName.value,ProcessResult)’>

(4) Sharing State Between Client and Server

[0224] Earlier examples addressed the issues of state management bydemonstrating that the scripting object model objects manage their ownstate. To maintain state between objects, an additional approach can beused. The ASP script fragment below shows how this may be done using ahidden form element. The page initializes a value and then increments itby one each time the user clicks a button. <% Dim Value1 IfRequest.ServerVariables(“REQUEST_METHOD”) = “POST” Then   Value1 =Request.Form(“Value1”)   Value1 = Value1 + 1 Else   Value1 = 0 End If %><FORM NAME=MyForm METHOD=POST> <INPUT TYPE=HIDDEN NAME=Value1VALUE=”<%=Value1%>”> Value = <%=Value1%><br> <INPUT TYPE=SUBMITVALUE=”Submit”>

[0225] The scripting object model (SOM) makes state management easier byproviding a way to publish page properties through the Page object.Using the Page Object DTC the developer can publish a property, whichcan then be accessed using “get” and “set” methods on the Page Object.The sample below shows the same functionality implemented using the SOM:[PAGE OBJECT] <SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER> SubthisPage_onenter   If thisPage.firstEntered Then    thisPage.setValue1(0)   End If End Sub Sub Button1_onclick  thisPage.setValue1(thisPage.getValue1( ) + 1)   End Sub </SCRIPT>Value = <%=thisPage.getValue1( )%><br> <INPUT TYPE=SUBMITVALUE=”Submit”>

[0226] The remote scripting components of the Scripting Library includea set of client script functions and objects that can be used inconjunction with the Page Object DTC or separately. When used with thePage Object DTC, remote scripting functions are published as methods ofthe execute object.

[0227] G. Construction of Objects

[0228] The Scripting Object Model (SOM) provides an event-basedexecution model for ASP pages. As discussed above, while in actuality,the page is executed serially as any other ASP page, the SOM provides aframework for programming to an event-based model.

[0229] At a high-level, the execution and eventing sequence is similarto the DHTML browser execution sequence. Objects on the page areconstructed and initialized. An onenter event is fired to indicate thatthe page is loaded and all objects are ready to be scripted. This is anideal place to initialize variables and objects. After the onenter eventis fired, execution is transferred to an entry-point or event-handler.By default, the content portion of the page will be executed which isequivalent to invoking the show entry-point. In many cases, executionwill transfer to a server-side handler as a result of a button click orsome other user action. An onshow event is fired just prior to executingthe content portion of the page. This is an ideal place to set the finalstate for any objects just prior to them rendering their HTML output.After the content portion of the page is executed, an onexit event isfired to indicate the page is unloading.

[0230] 1. Execution and Event Sequence

[0231] a) Object Construction Phase

[0232] Each object is constructed. This is accomplished by executing allJScript functions which conform to the following naming convention,“xxxx_ctor”. The DTCs generate a _ctor function for the runtime objectthey represent. One implementation executes each _ctor in the order itappears on the page. An object constructor should be self-contained, andshould not expect any other object to have already been constructed.

[0233] b) Construction of the “thisPage” object

[0234] The first object constructed will be a SOM Object named thisPage.This object provides properties, methods, and events that comprise theScripting Object Model. Other objects will use the thisPage object forstate services, event notification, and other purposes.

[0235] c) Registering an Initialization Function

[0236] The constructor function of each object will register aninitialization function with the thisPage object via the advise method.The initialization functions will be invoked during the initializationphase, after all object constructors have been invoked. A pointer to theinitialization function is provided as a parameter to the constructor,and the function implementation is generated by a DTC based on theproperties set at design-time. A Recordset object will register itsinitialization function with a higher priority than other objects. Thisensures that the Recordset objects will be initialized before any otherobjects that may depend on the Recordset for databinding.

[0237] d) Registering Default EventHandlers

[0238] The constructor function for most objects may register anydefault EventHandlers for the object. A default EventHandler is a methodwhich conforms to the naming convention “object_event”. The Recordsetobject will defer registration of its default EventHandlers until theend of the initialization phase (with the exception of the onbeforeopenevent). This ensures that the default Recordset EventHandlers will notbe fired until all other objects have been both constructed andinitialized.

[0239] e) Object Initialization Phase

[0240] The registered initialization functions will be invoked in thisphase. The functions are invoked in priority order, with functions ofsame priority being invoked in the order registered.

[0241] f) Recordset Initialization

[0242] The Recordset initialization functions are registered with a highpriority, such that all Recordsets will be initialized before any otherobjects. The initialization function of the Recordset will setup theconnection and command for the Recordset based upon settings chosen viathe Recordset DTC property pages at design-time. If the Recordset is setto autoopen or if the Recordset was left open on the previous roundtripto this same page, the Recordset will be opened at this point. Toprevent a Recordset from being opened during this initialization phase,the autoopen flag should be disabled in the DTC property page, and theRecordset should be explicitly closed prior to exiting the page. ThethisPage_onexit handler is a good place for closing Recordsets.

[0243] g) Object Initialization

[0244] Object initialization functions are registered with a neutralpriority, and will be invoked after high priority initializationfunctions, such as those for the Recordset. Objects which are set todatabind to a Recordset, will use the advise method of the appropriateRecordset to register a handler on the onrowenter event and possible theonbeforeupdate event. The onrowenter handler will be used to bind datafrom the Recordset into the object. The onbeforeupdate handler will beused to bind data from the object into the Recordset. If the Recordsetis already open when an object registers an onrowenter handler, thenthat handler will be invoked immediately in order to bind the object tothe current row of the Recordset. Following the registration ofdatabinding handlers, the object will restore any state that has beenroundtripped back to this page.

[0245] H. Summary

[0246] The programming model and embodiments thereof in various formsprovides a number of advantages to the various users. For example, thesystem provides an easier way for developers to conceptualize a site.Also, in targeting an IE 4 DHTML client, a programmer can run VB-likeforms, can write code for the end client and can provide an interactiveenvironment for the end client. Further, supplied forms may be supportedby objects and script behind the form. This form then can execute on aserver in a linear sequence.

[0247] While the above embodiments considered with reference todesign-time controls, alternative controls may also be used. Inparticular, because a design-time control can be made part of a page,and therefore inadvertently deleted by a developer, an alternativeembodiment of the invention uses separate pages for the control andproperty pages for each object. These pages would be inaccessible bydevelopers by placing them in an alternate directory or by making themread-only.

[0248] Depending on its programming, each design-time control mayinclude non-ActiveX scripts as well. Therefore, by instantiating thedesign-time control into a web page, the resulting run-time code mayinclude both the ActiveX implementation as well as the non-ActiveXcounterpart. Non-ActiveX scripts may include, for example, JAVA® (by SumMicrosystems). Other non-ActiveX scripts may also be included.

[0249] It will be apparent to those skilled in the art that applicationof the present invention is not restricted to the Internet. It is alsoenvisioned that the techniques of the present invention apply to anynetwork using HTTP, including HTTPS-compliant networks, intranets andextranets. It is further envisioned that the techniques of the presentinvention apply in any text-authoring context where complex scriptsrequire detailed knowledge of databases as well as related pages. Forexample, embodiments of the present invention contemplate the use of theprogramming object modeling system in conjunction with other systemsincluding spreadsheets and other related environments.

[0250] Further, the present invention may also be implemented in apeer-to-peer computing environment or in a multi-user host system with amainframe or a minicomputer. Thus, the computer network, in which theinvention is implemented, should be broadly construed to include anyclient/server computer network from which a client can retrieve a remotedocument on a server (even if that document is available on the samemachine or system).

[0251] In the foregoing specification, the present invention has beendescribed with reference to specific exemplary embodiments thereof.Although the invention has been described in terms of a preferredembodiment, those skilled in the art will recognize that variousmodifications, embodiments or variations of the invention can bepracticed within the spirit and scope of the invention as set forth inthe appended claims. All are considered within the sphere, spirit, andscope of the invention. The specification and drawings are, therefore,to be regarded in an illustrated rather than restrictive sense.Accordingly, it is not intended that the invention be limited except asmay be necessary in view of the appended claims.

We claim:
 1. A user interface for providing a designer with an enhancedprogramming environment comprising: a first display portion representinga page, the first display portion receiving dragged and dropped objects;a second display portion representing a library of the objects fordragging and dropping the objects into the first display portion, saidobjects executable on one of a server and a client; and a third displayportion for configuring at least one of a method or property of one ofthe objects after the one of the objects has been dragged and droppedinto the first display portion.
 2. The user interface according to claim1, further comprising: a fourth display portion providing a selectionbetween scripting the object for said server or for said client.
 3. Asystem for providing a designer with an enhanced programming environmentcomprising: a library of objects capable of being dragged and droppedonto a page, said objects including script that executes on one of aserver and a client; a first display portion representing a page, thefirst display portion receiving dragged and dropped objects; a seconddisplay portion displaying said library of objects, said systemproviding for dragging and dropping the objects from said second displayportion into the first display portion; and a third display portion forconfiguring at least one of a method or property of one of the objectsafter the one of the objects has been dragged and dropped into the firstdisplay portion.
 4. A method of operating a user interface, saidinterface providing a designer with an enhanced programming environment,said method comprising the steps of: selecting an object from a libraryof objects capable of being dragged and dropped onto a page, saidobjects including script that executes on one of a server and a client;placing the object on a page; providing a determination of whetherscript support said object should execute on said server or said clientto said environment; responding to said determination by retrieving fromsaid library of objects at least one of a first script for instantiatingsaid object on said server and a second script for instantiating saidobject on said client; transmitting said page to a server with at leastone of said first script and said second script.
 5. The method accordingto claim 4, further comprising the step of: wherein in response to saidtransmitting step, said server saves said page.
 6. The method accordingto claim 4, further comprising the step of: storing said determinationin a page object control on said page.
 7. The method according 4,further comprising the step of: calling said object on said page from asecond page.
 8. The method according to claim 7, wherein said callingstep further comprises the step of: referencing a page object control onsaid page storing said determination.
 9. The system according to claim3, further comprising a page object control storing whether said objectshould be scripted on said client or said server.
 10. The systemaccording to claim 3, further comprising a second page calling saidobject located on said page.
 11. The system according to claim 3,further comprising a storage accessible by said server for storing saidpage as including said object being scripted for at least one of saidserver or said client.
 12. The system according to claim 10, whereinsaid second page calls a page object control containing at least oneproperty or method for said object.
 13. A method for designing a page ina first language model comprising the steps of: dragging and droppingobjects from a first display object library onto a page; setting theproperties associated with objects; designating whether said objectsshould execute on a server or on a client; outputting said pagecontaining said represented objects into a second language model forexecution.